<small>{{$stateParams.typeName}} </small>
<div class="col-lg-12" ng-controller="ProjectDataController">
    <div class="left-head">
        <!-- 文件功能 -->
        <div class="btn-group btn-group-sm kod_path_tool">
          <div class="logo">
            <img src="http://7xi6l3.com1.z0.glb.clouddn.com/logo2.png">
          </div>
          <div class="input-group search-btn datasearch">
             <input type="text" placeholder="输入资源名前缀匹配" class="form-control input-sm seaript">
             <span class="input-group-btn">
                <button type="submit" class="btn btn-default btn-sm searbtn"><i class="fa fa-search"></i>
                </button>
             </span>
          </div>
          <div class="searight" ng-controller="SeniorController">
            <button type="button" class="btn btn-primary btn-lg" ng-click="openSenior()">高级搜索</button>
          </div>
        </div>
    </div>
    <div class="ng-isolate-scope nav_top" ng-controller="TabController">
      <ul class="nav nav-tabs">
          <li class="all"><a href="#/app-h/list-index" class="sort_button">基因组数据详细分类<em class="fa fa-angle-down"></em></a></li>
          <li ng-repeat="tab in tabs"><a ui-sref="app-h.datatable({typeName: tab.eh})" id="{{tab.eh}}" name="studies">{{tab.ch}}（{{tab.eh}}）</a></li>
      </ul>
    </div>
    <div class="sidemenu col-lg-2">
      <div class="flq_head">
        <ul class="">
          <li class="line"><a href=""class="" title="基因组">基因组</a></li>
          <li class="line"><a href=""  class="" title="项目">项目</a></li>
        </ul>
      </div>
      <div class="flq_body" ng-controller="DatatableController">
        <dl class="primary_dl">
          <dt>
            <span>
              <a class="" title=""><em class="fa fa-angle-down"></em>组织机构
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl" ng-repeat="orga in organisms">
          <dt class="datatab">
            <span>
              <a class="" title="{{orga.Name}}" ng-click="typesearch(orga.Name)">{{orga.Name}}
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl">
          <dt>
            <span>
              <a class="" title=""><em class="fa fa-angle-down"></em>类型
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl" ng-repeat="type in types">
          <dt class="datatab">
            <span>
              <a class="" title="{{type.Name}}" ng-click="typesearch(type.Name)">{{type.Name}}
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl">
          <dt>
            <span>
              <a class="" title=""><em class="fa fa-angle-down"></em>提交者
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl" ng-repeat="user in users">
          <dt class="datatab">
            <span>
              <a class="" title="{{user.Name}}" ng-click="typesearch(user.Email)">{{user.Email}}
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl">
          <dt>
            <span>
              <a class="" title=""><em class="fa fa-angle-down"></em>仪器
              </a>               
            </span>
          </dt>
        </dl>
        <dl class="primary_dl" ng-repeat="instrument in instruments">
          <dt class="datatab">
            <span>
              <a class="" title="{{instrument.Name}}" ng-click="typesearch(instrument.Name)">{{instrument.Name}}
              </a>               
            </span>
          </dt>
        </dl>
      </div>
    </div>
    <div class="col-lg-9 databody">
      <!-- ngRepeat + ngResource-->
      <div id="panelDemo13">
        <div class="right-cnt-head">
          <div>
            <button type="button" class="mb-sm btn btn-primary" ng-show="datadown"><em class="fa fa-download"></em>下载</button>
            <label ng-repeat="selectedTag in selectedTags">
            {{selectedTag}}
            </label>
          </div>
        </div>
        <!-- Editable row-->
        <table class="table table-bordered table-hover bg-white" datatable="ng" dt-options="dtOptions" dt-column-defs="dtColumnDefs">
          <thead>
           <tr style="font-weight: bold">
              <th style="width:5%">
                <div data-toggle="tooltip" class="checkbox c-checkbox">
                   <label>
                      <input type="checkbox" id="all" ng-click="allCheckOrNot($event)"/>
                      <span class="fa fa-check"></span>
                   </label>
                </div>
              </th>
              <th style="width:25%">标题</th>
              <th style="width:25%">类别</th>
              <th style="width:25%">提交者</th>
              <th style="width:20%"></th>
           </tr>
          </thead>
          <tbody>
            <tr ng-repeat="card in projects" ng-mouseenter="show = true" ng-mouseleave="show = false" context-menu="onShow()" context-menu-close="onClose()" data-target="menu-{{ card.Title}}">
               <td>
                  <div class="checkbox c-checkbox">
                   <label>
                      <input type="checkbox" id="{{card.Title}}" name="{{card.Title}}" ng-checked="isSelected(card.Title)" data-_id="{{card.Title}}" ng-click="updateSelection($event)">
                      <span class="fa fa-check"></span> 
                   </label>
                </div>
              </td>
              <td>
                  <span><a ui-sref="app-h.detail({typeName: $stateParams.typeName,projectName: card.Title})" id="{{card.Title}}">{{card.Title}}{{card.fields.Title}}</a></span>
                <!--右键出现的菜单区域-->
                <div class="dropdown position-fixed" id="menu-{{ card.Title}}">
                  <ul class="dropdown-menu" role="menu">
                    <li><a class="pointer" role="menuitem" tabindex="1" ui-sref="app-h.detail({projectName: card.Title})"><em class="icon-folder"></em>查看详情</a></li>
                    <li><a class="pointer" role="menuitem" tabindex="2"><em class="icon-cloud-download"></em>下载</a></li>
                  </ul>
                </div>
               </td>
               <td>
                  <!-- editable group (select-remote)-->
                  <span>{{ card.Type }}{{card.fields.Type}}</span>
               </td>
               <td><!-- editable group (select-remote)-->
                  <span>{{ card.Submitter }}{{ card.fields.Submitter }}</span>
                </td>
                <td style="white-space: nowrap">
                <div ng-show="show">
                  <div ng-show="!rowform.$visible" class="">
                     <a ng-click="rowform.$show()" title="Edit" class="">
                       <em class="fa fa-download"></em>
                     </a>
                  </div>
                </div>
               </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
</div>
<div class="searight" ng-controller="SeniorController">
  <script type="text/ng-template" id="/myModalSenior.html">
    <div class="modal-header hander" drag-handle>
      <button type="button" data-dismiss="modal" aria-hidden="true" ng-click="cancel()" class="close">×</button>
      <h4 id="myModalLabel" class="modal-title">高级搜索</h4>
    </div>
    <div class="modal-body" ng-controller="DatatableController">
      <div class="form-group">
        <p class="m0">组织机构</p>
        <ui-select ng-model="organism.selected" theme="bootstrap" ng-disabled="disabled" class="text-left">
           <ui-select-match placeholder="请选择组织机构或者输入机构关键字">{{$select.selected.Name}}</ui-select-match>
           <ui-select-choices repeat="organism in organisms | propsFilter: {Name: $select.search}">
              <div ng-bind-html="organism | highlight: $select.search"></div>
           </ui-select-choices>
        </ui-select>
        <div class="text-sm text-muted mt-sm">{{organism.selected}}</div>
      </div>
      <div class="form-group">
        <p class="m0">类型</p>
        <ui-select ng-model="type.selected" theme="bootstrap" ng-disabled="disabled" class="text-left">
          <ui-select-match placeholder="请选择类型或者输入类型关键字">{{$select.selected.Name}}</ui-select-match>
          <ui-select-choices repeat="type in types | filter: $select.search">
            <span ng-bind-html="type.Name | highlight: $select.search"></span>
          </ui-select-choices>
        </ui-select>
        <div class="text-sm text-muted mt-sm">{{type.selected.Name}}</div>
      </div>
      <div class="form-group">
        <p class="m0">作者</p>
        <ui-select ng-model="submitter.selected" theme="bootstrap" ng-disabled="disabled" class="text-left">
          <ui-select-match placeholder="请选择作者或者输入作者关键字">{{$select.selected.Email}}</ui-select-match>
          <ui-select-choices repeat="submitter in users | filter: $select.search">
            <span ng-bind-html="submitter.Email | highlight: $select.search"></span>
          </ui-select-choices>
        </ui-select>
        <div class="text-sm text-muted mt-sm">{{submitter.selected.Email}}</div>
      </div>
      <div class="form-group">
        <p class="m0">仪器</p>
        <ui-select ng-model="instrument.selected" theme="bootstrap" ng-disabled="disabled" class="text-left">
          <ui-select-match placeholder="请选择仪器或者输入仪器关键字">{{$select.selected.Name}}</ui-select-match>
          <ui-select-choices repeat="instrument in instruments | filter: $select.search">
            <span ng-bind-html="instrument.Name | highlight: $select.search"></span>
          </ui-select-choices>
        </ui-select>
        <div class="text-sm text-muted mt-sm">{{instrument.selected.Name}}</div>
      </div>
    </div>
    <div class="modal-footer">
      <button type="button" class="btn btn-primary btn-lg"><i class="fa fa-search"></i>搜索</button>
    </div>
  </script>
</div>
